import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';

const routes: Array<RouteRecordRaw> = [
  // ...已有的其他路由配置...

  {
    path: '/',
    name: '首页',
    component:()=> import("@/views/Home/Index.vue"),
    children:[{
      path: '/file',
      name: '全部文件',
      component:()=> import("@/views/FileIndex/FileList.vue"),
    },]
  },
  {
    path: '/404',
    name: '404',
    component:  ()=> import("@/views/404/404.vue"),
    meta:{
      title:"404",
    },
  },
  {
    path: '/:pathMatch(.*)',
    redirect: '/404',
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;